<style>
    table th, table td{
        text-align: center !important;
    }
    .page-content .portlet .portlet-search-body .search-item{
        width: 15%;
    }
</style>

<div class="portlet">
    <!--<div class="portlet-actions">
        <button class="btn blue btn-sm" ng-click="grid.add()"><i class="fa fa-plus"></i> 新增</button>
    </div>-->
    <form class="portlet-search-body" name="queryForm">
        <input type="text" class="form-control search-item" ng-model="stockName" placeholder="材料名称">
        <div class="search-item">
            <button class="btn btn-icon-only default"><i class="fa fa-chevron-right"></i></button>
            <button class="btn btn-sm query" ng-click="query();"><i class="fa fa-search"></i> 查询</button>
            <button class="btn btn-sm reset" ng-click="reset();"><i class="fa fa-eraser"></i> 重置</button>
        </div>
    </form>
    <div class="portlet-body">
        <table ed-grid="grid"  class="table table-striped table-bordered table-advance table-hover"
               data-options="url: 'stockAlert/query.do', modelText: 'xx列表', form: 'queryForm', modal: 'modal'">
            <thead>
            <tr>
                <th data-options="field: '_index'"></th>
                <th data-options="field: 'stockName'">材料名称</th>
                <th data-options="field: 'typeName'">类型</th>
                <th data-options="field: 'brand'">品牌</th>
                <th data-options="field: 'spec'">规格</th>
                <th data-options="field: 'unit'">单位</th>
                <th data-options="field: 'amount'">总数</th>
                <th data-options="field: 'alertNum'">预警数量</th>
                <!--<th>操作</th>-->
            </tr>
            </thead>
        </table>
    </div>
</div>

<div ed-modal="modal" data-options="title: 'xxxx', static: true, width: 720, defaultButton:false,onHidden:'reset'">
    <form action="#" class="form-horizontal w5c-form" w5c-form-validate novalidate name="validateForm">
        <div class="form-body">
        	<div class="form-group">
				<label class="col-md-2 control-label">材料名称</label>
				<div class="col-md-4">
					<input type="text" class="form-control" name="stockName" ng-model="stockAlert.stockName" required>
            	</div>
                <label class="col-md-2 control-label">类型</label>
                <div class="col-md-4">
                    <input type="text" class="form-control" name="typeName" ng-model="stockAlert.typeName" required>
                </div>
            </div>
        	<div class="form-group">
				<label class="col-md-2 control-label">品牌</label>
				<div class="col-md-4">
					<input type="text" class="form-control" name="brand" ng-model="stockAlert.brand" required>
            	</div>
                <label class="col-md-2 control-label">规格</label>
                <div class="col-md-4">
                    <input type="text" class="form-control" name="spec" ng-model="stockAlert.spec" required>
                </div>
            </div>
        	<div class="form-group">
				<label class="col-md-2 control-label">单位</label>
				<div class="col-md-4">
					<input type="text" class="form-control" name="unit" ng-model="stockAlert.unit" required>
            	</div>
                <label class="col-md-2 control-label">总数</label>
                <div class="col-md-4">
                    <input type="text" class="form-control" name="amount" ng-model="stockAlert.amount" required>
                </div>
            </div>
        </div>
        <div class="form-actions">
            <button type="button" class="btn default" ng-click="grid.cancel();">
                <i class="fa fa-times"></i> 取消
            </button>
            <button type="button" class="btn blue" w5c-form-submit="grid.save();">
                <i class="fa fa-times"></i> 确定
            </button>
        </div>
    </form>
</div>
